﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/AgentMaster.Master"
    AutoEventWireup="true" CodeBehind="Property.aspx.cs" Inherits="whatpricemyhouse.agent.Property" %>

<%@ Register Src="~/Controller/PlaceSelector.ascx" TagName="PlaceSelector" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">

        function mouseOver1(theObj) {
            theObj.src = "../images/button/add_property-w.png";
        }
        function mouseOut1(theObj) {
            theObj.src = "../images/button/add_property.png";
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:LoginView ID="LoginView2" runat="server">
        <RoleGroups>
            <asp:RoleGroup Roles="agent">
                <ContentTemplate>
                    <div class="welcomeInfo">
                        <asp:Label ID="Label1" runat="server" Text="" CssClass="largeHeaderStep">Admin Area :</asp:Label>
                        <asp:Label ID="Label2" runat="server" Text="Add Property" 
                            CssClass="largeHeaderTitle"></asp:Label>
                        <div class="hrHolder">
                            <hr />
                        </div>
                    </div>
                    <asp:HiddenField ID="propertyId" runat="server" />
                    <div class="addNewPropertyTable">
                    <div class="addNewPropertyTableHeader">
                    </div>
                    <div class="theArea">
                        <div class="location">
                            Location:<br />
                            <uc1:PlaceSelector ID="placeSelector" runat="server" />
                            <br />
                        </div>
                        <div class="otherLocation">
                            Other Location:<br />
                            <asp:TextBox ID="OtherLocationTxt" runat="server"></asp:TextBox><br />
                        </div>
                        <div class="streetNum">
                            Street No.:<br />
                            <asp:TextBox ID="StreetNumTxt" runat="server"></asp:TextBox><br />
                        </div>
                        <div class="address">
                            Address:<br />
                            <asp:TextBox ID="AddressTxt" runat="server"></asp:TextBox><br />
                        </div>
                        <div class="status">
                            Status:<br />
                            <asp:TextBox ID="StatusTxt" runat="server"></asp:TextBox><br />
                        </div>
                        <div class="dateOfSale">
                            Date of Sale:<br />
                            <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
                                BorderColor="#999999" DayNameFormat="Shortest" FirstDayOfWeek="Sunday" Font-Names="Verdana"
                                Font-Size="8pt" ForeColor="Black" Height="180px" Width="200px" 
                                CellPadding="4">
                                <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                                <NextPrevStyle VerticalAlign="Bottom" />
                                <OtherMonthDayStyle ForeColor="#808080" />
                                <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                                <SelectorStyle BackColor="#CCCCCC" />
                                <TitleStyle BackColor="#999999" Font-Bold="True" BorderColor="Black" />
                                <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                                <WeekendDayStyle BackColor="#FFFFCC" />
                            </asp:Calendar>
                        </div>
                        <div class="price">
                        Price:
                            <br />
                            <asp:TextBox ID="PriceTxt" runat="server" MaxLength="8" ></asp:TextBox><br />
                        </div>
                        <div class="description">
                            Description:<br />
                            <asp:TextBox ID="DescriptionTxt" runat="server" Height="155px" Rows="5" 
                                TextMode="MultiLine" Width="500px"></asp:TextBox><br />
                        </div>
                        <div class="image">
                            Image Upload:<br />
                            <asp:FileUpload ID="FileUpload1" runat="server" />
                            <asp:Label ID="UploadFileError" runat="server" Text="" ForeColor="Red"></asp:Label>
                            <br />
                        </div>
                        <div class="imageSelector">
                            Or Select one of images below...<br />
                            <asp:RadioButtonList ID="ImageSelectRB" runat="server" RepeatColumns="3" RepeatDirection="Horizontal"
                                TextAlign="Left" DataSourceID="SqlDataSource1" DataTextField="url" DataValueField="alt">
                            </asp:RadioButtonList>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WhatPriceMyHouseConnectionString %>"
                                SelectCommand="SELECT * FROM [sell_status_image_table] ORDER BY [seq]"></asp:SqlDataSource>
                        </div>
                        </div>
                        <div class="theAreadFooter"></div>
                        <div class="buttonHolder">
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/button/add_property.png"
                            OnClick="ImageButton1_Click" Visible="True" />
                        <asp:ImageButton ID="Update" runat="server" ImageUrl="~/images/button/update.png"
                            Visible="False" OnClick="Update_Click" />
                    </div>
                    </div>
                    
                </ContentTemplate>
            </asp:RoleGroup>
        </RoleGroups>
    </asp:LoginView>
</asp:Content>
